package com.app.controller;


import com.app.entity.Evaluate;
import com.app.service.EvaluateService;
import com.app.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zxy
 * @since 2021-04-07
 */
@RestController
@RequestMapping("/evaluate")
public class EvaluateController {
    @Autowired
    private EvaluateService evaluateService;
    @RequestMapping("/token/findEvaluateAll")
    public Result findEvaluateAll(@RequestParam("coaid") Integer id){
        return evaluateService.findEvaluateAll(id);
    }
    @RequestMapping("/token/insertEvaluate")
    public Result insertEvaluate(@RequestBody Evaluate evaluate){
        return evaluateService.insertEvaluate(evaluate);
    }
    @RequestMapping("/token/evaluateByCoach")
    public Result evaluateByCoach(){
        return evaluateService.evaluateByCoach();
    }
}

